home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Games / Saga / source / amigan.h next >
Text File  |  2002-10-27  |  5KB  |  147 lines

  1. typedef signed char  FLAG;   /* 8-bit signed quantity (replaces BOOL) */
  2. typedef signed char  SBYTE;  /* 8-bit signed quantity (replaces Amiga BYTE) */
  3. typedef signed short SWORD;  /* 16-bit signed quantity (replaces Amiga WORD) */
  4. typedef signed long  SLONG;  /* 32-bit signed quantity (same as LONG) */
  5. #define elif         else if
  6. #define AGLOBAL      ;       /* global (project-scope) */
  7. #define MODULE       static  /* external static (file-scope) */
  8. #define PERSIST      static  /* internal static (function-scope) */
  9. #define AUTO         auto    /* automatic (function-scope) */
  10.  
  11. #define COUNTERWIDTH   2 // in words (24 pixels, rounded up)
  12. #define COUNTERHEIGHT 24 // in pixels
  13. #define DEPTH          7 // in bitplanes
  14. #define CONNECTIONS    7
  15.  
  16. // types of things
  17. #define HERO       0
  18. #define JARL       1
  19. #define MONSTER    2
  20. #define TREASURE   3
  21. #define SORD       4
  22. #define KINGDOM    5
  23.  
  24. // quantities of things
  25. #define HEROES     5
  26. #define JARLS     17
  27. #define MONSTERS  26
  28. #define SORDS      5
  29. #define TREASURES  3
  30.  
  31. #define FACEUP     0
  32. #define FACEDOWN   1
  33.  
  34. #define SCREENXPIXEL   640
  35. #define SCREENYPIXEL   512
  36.  
  37. #define SLOTS      (HEROES + 1 + JARLS + 1 + MONSTERS + 1 + TREASURES + 1 + SORDS + 1 - 1)
  38. #define ATTACKS    (HEROES + 1 + JARLS + 1 + MONSTERS + 1 + 36)
  39.  
  40. AGLOBAL struct WorldStruct
  41. {   // initialized
  42.  
  43.     SLONG  centrex, centrey, tax, type;
  44.     STRPTR name;
  45.     SLONG  connection[CONNECTIONS + 1];
  46.  
  47.     // uninitialized
  48.     SLONG  hero;
  49.     FLAG   is, slot[SLOTS + 1];
  50. };
  51. AGLOBAL struct HeroStruct
  52. {   // all uninitialized
  53.  
  54.     STRPTR name;
  55.     SLONG  strength, moves, glory, luck, control, sword, where, homewhere,
  56.            wealth, slot, promoted, rune, god, sea, maidens;
  57.     FLAG   alive, verydead, wounded, foundbob, moved, loseturn, hagall,
  58.            routed, attacking, defending;
  59.     SLONG  attacked[ATTACKS + 1], attacktype[ATTACKS + 1];
  60. };
  61. AGLOBAL struct JarlStruct
  62. {   // initialized
  63.     SLONG  strength,
  64.            moves;
  65.     STRPTR name;
  66.  
  67.     // uninitialized
  68.     FLAG   taken, alive, foundbob, recruitable, loseturn, hagall, routed,
  69.            attacking, defending;
  70.     SLONG  where, homewhere, wealth, face, hero, slot, sea,
  71.            attacked[ATTACKS + 1], attacktype[ATTACKS + 1];
  72. };
  73. AGLOBAL struct MonsterStruct
  74. {   // initialized
  75.     SLONG  species, strength, moves;
  76.     STRPTR name;
  77.  
  78.     // uninitialized
  79.     FLAG   taken, alive, foundbob, hagall;
  80.     SLONG  where, slot, wealth, sea;
  81. };
  82. AGLOBAL struct TreasureStruct
  83. {   // initialized
  84.     STRPTR name;
  85.  
  86.     // uninitialized
  87.     SLONG  possessor, possessortype;
  88.     FLAG   taken, foundbob;
  89.     SLONG  where, slot;
  90. };
  91. AGLOBAL struct SordStruct
  92. {   // initialized
  93.     STRPTR name;
  94.  
  95.     // uninitialized
  96.     SLONG  possessor, possessortype;
  97.     FLAG   taken, foundbob;
  98.     SLONG  where, slot;
  99. };
  100.  
  101. // from saga.c
  102. AGLOBAL void cleanexit(SLONG rc);
  103.  
  104. // from map.c
  105. AGLOBAL void drawmap(void);
  106.  
  107. // from map2.c
  108. AGLOBAL void drawmap2(void);
  109.  
  110. // from gfx.c
  111. AGLOBAL void drawabout(void);
  112. AGLOBAL void drawlogo(void);
  113.  
  114. // from counters.c
  115. AGLOBAL void init_counters(void);
  116. AGLOBAL void move_hero(SLONG whichhero, FLAG display);
  117. AGLOBAL void move_jarl(SLONG whichjarl, FLAG display);
  118. AGLOBAL void move_monster(SLONG whichmonster, FLAG display);
  119. AGLOBAL void move_treasure(SLONG whichtreasure, FLAG display);
  120. AGLOBAL void move_sord(SLONG whichsord, FLAG display);
  121. AGLOBAL void createcounters(void);
  122. AGLOBAL void destroycounters(void);
  123. AGLOBAL void revealjarl(SLONG whichjarl, FLAG display);
  124. AGLOBAL void hidejarl(SLONG whichjarl, FLAG display);
  125. AGLOBAL void unslot_hero(SLONG whichhero);
  126. AGLOBAL void unslot_jarl(SLONG whichjarl);
  127. AGLOBAL void unslot_monster(SLONG whichmonster);
  128. AGLOBAL void unslot_treasure(SLONG whichtreasure);
  129. AGLOBAL void unslot_sord(SLONG whichsord);
  130. AGLOBAL SLONG checkcounters(SWORD mousex, SWORD mousey, SLONG* countertype);
  131. AGLOBAL void select_hero(SLONG whichhero);
  132. AGLOBAL void deselect_hero(SLONG whichhero, FLAG display);
  133. AGLOBAL void select_jarl(SLONG whichjarl);
  134. AGLOBAL void deselect_jarl(SLONG whichjarl);
  135. AGLOBAL void remove_hero(SLONG whichhero, FLAG display);
  136. AGLOBAL void remove_jarl(SLONG whichjarl, FLAG display);
  137. AGLOBAL void remove_monster(SLONG whichmonster, FLAG display);
  138. AGLOBAL void remove_treasure(SLONG whichtreasure, FLAG display);
  139. AGLOBAL void remove_sord(SLONG whichsord, FLAG display);
  140. AGLOBAL void refreshcounters(void);
  141. AGLOBAL void reset_images(void);
  142. AGLOBAL void hero_to_jarl(SLONG whichhero, SLONG whichjarl);
  143. AGLOBAL void hero_info(SLONG whichhero);
  144. AGLOBAL void jarl_info(SLONG whichjarl);
  145. AGLOBAL void uninfo(void);
  146.  
  147.